<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>

<%
    String path = request.getContextPath();
    String ctx = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
    String wctx = request.getServerName()+":"+request.getServerPort()+path;
%>
<html>
<head>
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <title></title>
    <style type="text/css">
        body, html {width: 100%;height: 100%;margin:0;background-color: #000000}
    </style>
    <%--<script src='<%=ctx%>/websocket/external_api.js'></script>--%>
    <script src='https://meet.jit.si/external_api.js'></script>
</head>
<body>
<div id="meet" style="height: 100%;width: 100%;">
</div>
<script type="text/javascript">
    var domain = 'meet.jit.si';
    var TOOLBAR_BUTTONS= [
        'microphone', 'camera', 'closedcaptions', 'desktop', 'fullscreen',
        'fodeviceselection', 'hangup', 'profile', 'chat',
        'etherpad', 'settings', 'raisehand',
        'videoquality', 'filmstrip', 'stats', 'shortcuts',
        'tileview', 'download',  'mute-everyone'
    ];
    var options = {
        roomName: 'fengxianyingji2020',
        //width: 700,
        //height: 700,
        parentNode: document.querySelector('#meet'),
        configOverwrite: { prejoinPageEnabled: false,defaultLanguage:'zh' },
        interfaceConfigOverwrite: { TOOLBAR_BUTTONS: TOOLBAR_BUTTONS,HIDE_INVITE_MORE_HEADER: true,DISPLAY_WELCOME_PAGE_CONTENT: false,DEFAULT_LOCAL_DISPLAY_NAME: '我' ,JITSI_WATERMARK_LINK: 'http://www.test.com',DEFAULT_LOGO_URL:'images/flags.png'},
        userInfo: {
            email: 'email@jitsiexamplemail.com',
            displayName: '${sessionScope.username}'
        }
    };
    var api = new JitsiMeetExternalAPI(domain, options);

    function readyToCloseListener(object){
        //alert('关闭事件');
        document.getElementById("meet").style.display="none";
    }
    api.addEventListener("readyToClose", readyToCloseListener);
</script>

</body>
</html>
